<template>
	<view class="vehicle_container">
		<view class="mail_List">
			<view class="mail" style="font-weight: 700;">
				<view class="order">视频监控</view>
			</view>
		</view>
		<view class="icon">
			<u-icon name="arrow-left" color="#fefefe" size="40" @click="navigateBack"></u-icon>
		</view>
		<view class="plus_circle">
			<u-icon name="plus-circle" size="120" @click="newworkOrder"></u-icon>
		</view>
		<u-search :placeholder='placeholder' v-model="keyword" :show-action=false :disabled="true">
		</u-search>
		<view class="information_service" >
			<view class="owner" v-for="(item,index) in owners" :key=index @click="videoSurveillance(item.cameraId)">
				<view class="owner_picture"></view>
				<view class="owner_text">{{item.name}}</view>
			</view>
<!-- 			<view class="owner">
				<view class="owner_picture"></view>
				<view class="owner_text">东门监控</view>
			</view>
			<view class="owner">
				<view class="owner_picture"></view>
				<view class="owner_text">东门监控</view>
			</view>
			<view class="owner">
				<view class="owner_picture"></view>
				<view class="owner_text">东门监控</view>
			</view>
			<view class="owner">
				<view class="owner_picture"></view>
				<view class="owner_text">东门监控</view>
			</view>
			<view class="owner">
				<view class="owner_picture"></view>
				<view class="owner_text">东门监控</view>
			</view>
			<view class="owner">
				<view class="owner_picture"></view>
				<view class="owner_text">东门监控</view>
			</view>
			<view class="owner">
				<view class="owner_picture"></view>
				<view class="owner_text">东门监控</view>
			</view>
			<view class="owner">
				<view class="owner_picture"></view>
				<view class="owner_text">东门监控</view>
			</view>
			<view class="owner">
				<view class="owner_picture"></view>
				<view class="owner_text">东门监控</view>
			</view>
			<view class="owner">
				<view class="owner_picture"></view>
				<view class="owner_text">东门监控</view>
			</view> -->
<!-- 			<live-player
			  src="https://112.123.228.65:443"
			  autoplay
			  @statechange="statechange"
			  @error="error"
			  style="width: 300px; height: 225px;"
			/> -->
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				placeholder: "输入监控名称搜索",
				keyword: '',
				current: 1,
				show: true,
				// 所有展示数据
				owners: '',
			}
		},
		onLoad() {
				this.loginId = uni.getStorageSync("setModel")
			this.getcoursetype()
			// this.search()
		},
		methods: {
			// 展示全部数据
			getcoursetype() {
				//课程分类
				this.$http.get('Camera/selectCamera',{loginId:this.loginId.userId}).then(res => {
					console.log(res, '课程分类')
					this.owners = res.rows
				})
			},
			// 点击跳转查询设备详情
			videoSurveillance(cameraId) {
				this.openUrl(`/pagesA/application/onlineMonitoring/videoSurveillance/videoSurveillance?cameraId=${cameraId}`)
			}
		}
	}
</script>

<style lang="scss" scoped>
	.vehicle_container {
		.mail_List {
			overflow: hidden;
			width: 100%;
			background-color: #f2f2f2;

			.mail {
				height: 160rpx;
				line-height: 230rpx;
				color: #fff;
				font-size: 40rpx;
				background-color: #2a4f65;
			}

			.order {
				text-align: center;
			}
		}
		
		.plus_circle {
			position: absolute;
			top: 1000rpx;
			right: 10rpx;
			z-index: 999;
		}

		.icon {
			position: absolute;
			top: 96rpx;
			left: 20rpx;
		}

		// .icon_two {
		// 	position: absolute;
		// 	top: 18rpx;
		// 	right: 20rpx;
		// }

		/deep/.u-search {
			margin: 30rpx 30rpx 0 30rpx !important;
		}

		.information_service {
			display: flex;
			flex-wrap: wrap;
			padding: 0 20rpx;

			.owner {
				width: 20%;
				margin-top: 30rpx;
				text-align: center;

				.owner_picture {
					width: 120rpx;
					height: 120rpx;
					margin: 0 auto;
					background-color: #c4c4c4;
				}

				.owner_text {
					margin-top: 6rpx;
				}
			}
		}
	}
</style>
